VS Code has default formatters for JavaScript, TypeScript, JSON, HTML, and CSS. Each language has specific formatting options (for example, html.format.
You can format your code by right-clicking on the editor and selecting Format Document, or by using the Ctrl+Shift+I keyboard shortcut. Choose a formatter · Set a default formatter · General formatting settings
Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules. README.md · Prettierignore · CHANGELOG.md · Issues
Code Formatting Shortcut: Visual Studio Code on Windows - Shift + Alt + F Visual Studio Code on MacOS - Shift + Option + F Visual Studio Code on Ubuntu - Ctrl ...